<template>
  <div class="client-layout">
    <!-- 主要内容区域 -->
    <main class="main-content">
      <router-view />
    </main>
    
    <!-- 底部导航栏 -->
    <nav class="bottom-nav">
      <div class="nav-container">
        <router-link 
          to="/client" 
          class="nav-item"
          :class="{ active: $route.path === '/client' }"
        >
          <i class="fas fa-home"></i>
          <span>首页</span>
        </router-link>
        

        
        <router-link 
          to="/client/lawyer-contact" 
          class="nav-item"
          :class="{ active: $route.path.startsWith('/client/lawyer-contact') }"
        >
          <i class="fas fa-user-tie"></i>
          <span>联系律师</span>
        </router-link>
        
        <router-link 
          to="/client/points" 
          class="nav-item"
          :class="{ active: $route.path.startsWith('/client/points') }"
        >
          <i class="fas fa-gift"></i>
          <span>积分商城</span>
        </router-link>
        
        <router-link 
          to="/client/profile" 
          class="nav-item"
          :class="{ active: $route.path.startsWith('/client/profile') }"
        >
          <i class="fas fa-user"></i>
          <span>我的</span>
        </router-link>
      </div>
    </nav>
  </div>
</template>

<script>
export default {
  name: 'ClientLayout'
}
</script>

<style scoped>
.client-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding-bottom: 80px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  min-width: 60px;
}

.nav-item:hover {
  color: #3b82f6;
  background-color: #f8fafc;
}

.nav-item.active {
  color: #3b82f6;
  background-color: #eff6ff;
}

.nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-item span {
  font-size: 12px;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .nav-item {
    padding: 6px 8px;
    min-width: 50px;
  }
  
  .nav-item i {
    font-size: 18px;
  }
  
  .nav-item span {
    font-size: 11px;
  }
}
</style> 